#!/bin/bash -e
# $File: gendoc
# $Date: Mon Mar 05 19:58:50 2012 +0800
# $Author: jiakai <jia.kai66@gmail.com>

. ../init.sh

export PYNOJO_DOC_SPELLCHECK=1

make clean

sphinx-apidoc -o source/autogen ../pynojo
sphinx-apidoc -o source/autogen ../tests
rm -f source/autogen/modules.rst

echo > source/autogen/viewdoc.rst.txt
# extract real view docs after spell check, so that the names are not
# considered misspelled

make spelling
make doctest

echo -n 'Extracting view_config docs ...'
python ./extract-view-config-doc.py source/autogen/viewdoc.rst.txt
echo 'done'


make html

# vim: ft=sh
